<?php


namespace app\common\model;


use app\lib\exception\MysqlErrorException;
use think\Model;

class Account extends Model
{
    public function addAllAccount($name)
    {
        try{
            return self::where('name', '=', $name)
                ->find()
                ->toArray();
        }catch (\Exception $e){
            throw new MysqlErrorException();
        }
    }
}